<template>
  <span class="deductIndex">
    {{ name }}超过特殊设置时，
    <el-select v-model="value" style="width:100px">
      <el-option v-for="item in deducts" :key="item.id" :label="item.label" :value="item.value" />
    </el-select>
    特殊设置进行计算扣款
  </span>
</template>
<script>
import { deducts } from "./config";
export default {
  name: "deductIndex",
  props: {
    name: {
      type: String,
      default: ""
    }
  },
  watch: {
    value(e) {
      this.$emit("input", e);
    }
  },
  data() {
    this.deducts = deducts;
    return {
      value: true
    };
  },
  created() {
    this.value = !!this.$attrs.value;
  }
};
</script>
<style lang="less" scoped>
.deductIndex {
  display: flex;
  align-items: flex-end;
}
</style>
